#include "Precomp.h"
#include "ltGameState.h"
#include "ltGame.h"
#include "ltGraphicManager.h"

namespace Lotus
{
	IGameState::IGameState()
	:sceneManager(0)
	{
	}

	IGameState::~IGameState()
	{
		if(sceneManager)
			GraphicManager::getInstance().getOgreRoot()->destroySceneManager(sceneManager);
	}

	Ogre::SceneManager* IGameState::getSceneManager() const
	{
		return sceneManager;
	}

	void IGameState::setActiveCamera(Ogre::Camera *camera)
	{
		GraphicManager::getInstance().getOgreRenderWindow()->getViewport(0)->setCamera(camera);
	}
}